package com.mayisoftware.mayioa.business.score.impl.dao;

import com.mayisoftware.mayioa.business.score.api.domain.ScoreInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ScoreInfoMapper {

    public List<Map<String,String>> selectPlanSelectList(Long userId);

    public List<Map<String,Object>> selectSignPlanUsers(Long planId);

    public List<Map<String,Object>> selectPlanDetails(Long planId);

    public List<Map<String,Object>> selectPlanDetailsScore(@Param("planId") Long scorePlanId,@Param("userId") Long userId);

    public int isExistsScoreInfo(ScoreInfo scoreInfo);

    public int insertSelective(ScoreInfo scoreInfo);

    List<ScoreInfo> selectScoreInfoList( @Param("scoreInfo")ScoreInfo scoreInfo, @Param("loginUserId")Long loginUserId);

    int deleteScoreInfoByIds(Long[] recordIds);

    ScoreInfo selectByPrimaryKey (Integer recordId);

    int updateByPrimaryKeySelective(ScoreInfo scoreInfo);

    /**
     * 根据计划和用户信息读取记录id
     */
    List<ScoreInfo> selectScoreInfoListByUserAndPlan(ScoreInfo scoreInfo);

    int deleteByPlanIdAndUserId(ScoreInfo scoreInfo);

    public List<ScoreInfo> selectScoreListByUserAndPlanId(@Param("planId") Long planId,@Param("userId") Long userId);
}
